package cn.bandeqing.productType.entity;

import cn.bandeqing.frame.mybatis.config.InsertOrUpdateListener;
import cn.bandeqing.frame.mybatis.entity.BaseEntity;
import cn.bandeqing.productType.req.ProductTypeSaveOrUpdateReq;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 产品类目 实体类。
 *
 * @author fugui
 * @since 2023-12-28
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "bdq_product_type", onInsert = InsertOrUpdateListener.class, onUpdate = InsertOrUpdateListener.class)
@AutoMapper(target = ProductTypeSaveOrUpdateReq.class, convertGenerate = false)
public class ProductType extends BaseEntity {

    /**
     * 产品类目ID
     */
    @Id(keyType = KeyType.Auto)
    private Long ptId;

    /**
     * 产品类目label
     */
    private String ptName;

    /**
     * 正序 约小越靠前
     */
    private Integer ptSort;

    private Boolean customerHide;

    private Boolean indexSwitch;

    private String subTitle;

}
